﻿<div class="page-header position-relative">
    <div class="header-title">
        <h1>
            用户列表
        </h1>
    </div>
    <!--Header Buttons-->
    <div class="header-buttons">
        <a class="sidebar-toggler" href="#">
            <i class="fa fa-arrows-h"></i>
        </a>
        <a class="refresh" id="refresh-toggler" href="">
            <i class="glyphicon glyphicon-refresh"></i>
        </a>
        <a class="fullscreen" id="fullscreen-toggler" href="#">
            <i class="glyphicon glyphicon-fullscreen"></i>
        </a>
    </div>
    <!--Header Buttons End-->
</div>
<!-- /Page Header -->
<!-- Page Body -->
<div class="page-body">
    <div class="row">
        <div class="col-xs-12 col-md-12">
            <div class="widget">
                <div class="widget-header ">
                    <span class="widget-caption">编辑列表</span>
                    <div class="widget-buttons">
                        <a href="#" data-toggle="maximize">
                            <i class="fa fa-expand"></i>
                        </a>
                        <a href="#" data-toggle="collapse">
                            <i class="fa fa-minus"></i>
                        </a>
                        <a href="#" data-toggle="dispose">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div class="widget-body">
                    <div id="editabledatatable_wrapper" class="dataTables_wrapper form-inline no-footer" role="grid">
                        <div id="editabledatatable_filter" class="dataTables_filter">
                            <label>
                                <input class="form-control input-sm" aria-controls="editabledatatable" type="search"
                                       onblur="search($(this),'{{urlAdmin('member','getIndex')}}')" placeholder="ID 或 昵称"
                                       value="{{$keyword}}"
                                >
                            </label>
                        </div>
                        <table class="table table-striped table-hover table-bordered" id="editabledatatable">
                            <thead>
                            <tr role="row">
                                <th>ID</th>
                                <th>微信名称</th>
                                <th>房卡</th>
                                <th>积分</th>
                                <th>上次登录时间</th>
                                <th>创建时间</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            @foreach($rows['data'] as $v)
                                <tr>
                                    <td>{{$v['id']}}</td>
                                    <td>{{$v['wxname']}}</td>
                                    <td>{{$v['cardnum']}}</td>
                                    <td>{{$v['point']}}</td>
                                    <td>{{$v['last_login_time'] == 0 ? '' : $v['last_login_time']}}</td>
                                    <td class="center ">{{$v['created_at']}}</td>
                                    <td>
                                        @if(session('is_super_admin'))
                                        <a href="javascript:;" class="btn btn-info btn-xs edit"
                                           onclick="loadHtml('{{urlAdmin('member','getEdit',['id'=>$v['id']])}}','编辑用户')">
                                            <i class="fa fa-edit"></i> 编辑</a>
                                        {{--<a href="#" class="btn btn-danger btn-xs delete">--}}
                                            {{--<i class="fa fa-trash-o"></i>--}}
                                            {{--删除</a>--}}
                                        @endif
                                    </td>
                                </tr>
                            @endforeach
                            </tbody>
                        </table>
                        <div class="row DTTTFooter">
                            <div class="col-sm-6">
                                <div id="editabledatatable_info" class="dataTables_info" role="alert" aria-live="polite"
                                     aria-relevant="all">共 <<span class="red">{{$rows['last_page']}}</span>> 页
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div id="editabledatatable_paginate" class="dataTables_paginate paging_bootstrap">
                                    <ul class="pagination">
                                        <li class="prev @if(!$rows['prev_page_url']) disabled @endif">
                                            <a href="javascript:;"
                                               onclick="loadHtml('{{$rows['prev_page_url']}}')">上一页</a>
                                        </li>
                                        @foreach($rows['pageNoList']  as $v)
                                            <li @if($rows['current_page'] == $v) class="active" @endif>
                                                <a href="javascript:;"
                                                   onclick="loadHtml('{{urlAdmin('member','getIndex',['page'=>$v],2)}}')">{{$v}}</a>
                                            </li>
                                        @endforeach
                                        <li class="next @if(!$rows['next_page_url']) disabled @endif">
                                            <a href="javascript:;"
                                               onclick="loadHtml('{{$rows['next_page_url']}}')">下一页</a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>